package com.sun.umbrella.service.shiro.filter.resources;

import com.sun.umbrella.domain.entity.FilterChainsDO;
import com.sun.umbrella.domain.query.FilterChainsQuery;
import com.sun.umbrella.domain.vo.FilterChainsSaveVO;
import com.sun.umbrella.domain.vo.FilterChainsUpdateVO;
import com.sun.umbrella.domain.vo.FilterChainsVO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author Jay
 * @version v1.0
 * @description 过滤器资源
 * @date 2017-12-08 15:33
 */
public interface FilterChainService {

    /**
     * 根据sysId查询到对应的过滤器资源
     *
     * @param sysId
     * @return
     */
    List<FilterChainsDO> getFilterChainsBySysId(Integer sysId);


    /**
     * 分页查询过滤器配置列表
     *
     * @param filterChainsQuery
     * @param pageable
     * @return
     */
    Page<FilterChainsVO> queryFilterChainsList(FilterChainsQuery filterChainsQuery, Pageable pageable);


    /**
     * 删除过滤器配置记录
     *
     * @param id
     * @param sysId
     * @return
     */
    Boolean deleteFilterChain(Integer id, Integer sysId);


    /**
     * 保存过滤器配置记录
     *
     * @param filterChainsSaveVO
     * @return
     */
    Boolean saveFilterChain(FilterChainsSaveVO filterChainsSaveVO);


    /**
     * 修改启用 禁用 状态
     *
     * @param id
     * @param enabledState
     * @return
     */
    Boolean updateFilterEnable(Integer id, Integer enabledState);


    /**
     * 修改过滤器配置资源
     *
     * @param filterChainsUpdateVO
     * @return
     */
    Boolean updateFilterChain(FilterChainsUpdateVO filterChainsUpdateVO);
}
